<%@ page language="java" import="java.util.*"
	contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
	ArrayList<String> jsPaths = (ArrayList<String>) request
			.getAttribute("jsPaths");
	jsPaths.add("/resources/jquery/jstree/jquery-ui.custom.js");
	jsPaths.add("/resources/jquery/jstree/jquery.cookie.js");
	jsPaths.add("/resources/jquery/jstree/jquery.dynatree.min.js");
	jsPaths.add("/resources/custom/test/test.js");
%>

<script type="text/javascript">
	$(function() {
		$("#tree").dynatree({
			checkbox : true,
			selectMode : 3,
			onActivate : function(node) {
				alert("You activated " + node.data.title);
			},
			persist : true,
			children : [ {
				title : "北京",
				isFolder : true,
				children : [ {
					title : "北京市",
					isFolder : true,
					children : [ {
						title : "海淀区"
					}, {
						title : "东城区"
					}, {
						title : "西城区"
					}, {
						title : "朝阳区"
					}, ]
				}, ]
			}, {
				title : "上海",
				isFolder : true,
				children : [ {
					title : "上海市",
					isFolder : true,
					children : [ {
						title : "黄浦区"
					}, {
						title : "徐汇区"
					}, {
						title : "长宁区"
					}, {
						title : "静安区"
					}, ]
				}, ]
			}, ]
		});
	});
</script>
<div>
	<link
		href="${pageContext.request.contextPath}/resources/jquery/jstree/skin/ui.dynatree.css"
		rel="stylesheet">
	<div id="tree"></div>
</div>
